import axios from "../../axios.js"
// 渠道维护接口
export default {
  //删除渠道信息
  deleteChannel(data) {
    return axios({
      url: '/channelMaintenance/delete',
      method: 'post',
      data,
    })
  },
  // 添加渠道信息
  insertChannel(data) {
    return axios({
      url: '/channelMaintenance/insert',
      method: 'post',
      data,
    })
  },
  // 查看所有未停用的渠道
  selectChannel(data) {
    return axios({
      url: 'channelMaintenance/list',
      method: 'post',
      data
    })
  },

  // 修改渠道信息
  updateChannel(data,) {
    return axios({
      url: '/channelMaintenance/update',
      method: 'post',
      data,
    })
  },

  //根据id查询渠道
  selectChannelForId(data) {
    return axios({
      url: '/channelMaintenance/selectChannelForId',
      method: 'post',
      data,
    })
  },

  //查看详情
   GETDETAILS(data) {
    return axios({
      url: '/channelMaintenance/details',
      method: 'post',
      data,
    })
  },

  //获取中心
  GETLENDCENTER(data){
    return axios({
      url:'/customerOriginal/selectDep',
      method:'get',
      params:data,
    })
  },

   //获取部门
   GETLENDBUMEN(data){
    return axios({
      url:'/customerOriginal/selectDep',
      method:'get',
      params:data,
    })
  },

  //获取贷款类型  
  GETTYPE(data){
    return axios({
      url:'/channelMaintenance/selectChannelMaintenanceType',
      method:'get',
      params:data,
    })
  },

  //获取三级联动 
  GETTHREEUSER(data){
    return axios({
      url:'/channelMaintenance/selectChannelOwner',
      method:'get',
      params:data,
    })
  },

    //获取人
  GETLENDER(data,binding){
  return axios({
    url:'/customerOriginal/selectDepUser',
    method:'get',
    params:data,
    headers:{
      "binding": binding
    }
  })
},
// 获取拥有贷款类型：chengyi
getType_Api(data){
  return axios({
    url:'/channelMaintenance/channelMaintenanceType',
    method:'get',
    params:data
  })
},
// 获取下属渠道专员：chengyi
getTypeUser_Api(data){
  return axios({
    url:'/channelMaintenance/channelOwnerList',
    method:'get',
    params:data
  })
}

};
